use leetcode::lc202301::Solution;

#[test]
fn test_get_number_of_backlog_orders() {
    assert_eq!(
        Solution::get_number_of_backlog_orders(vec![
            vec![10, 5, 0],
            vec![15, 2, 1],
            vec![25, 1, 1],
            vec![30, 4, 0]
        ]),
        6
    );
    assert_eq!(
        Solution::get_number_of_backlog_orders(vec![
            vec![7, 1000000000, 1],
            vec![15, 3, 0],
            vec![5, 999999995, 0],
            vec![5, 1, 1]
        ]),
        999999984
    );
    assert_eq!(
        Solution::get_number_of_backlog_orders(vec![
            vec![1, 29, 1],
            vec![22, 7, 1],
            vec![24, 1, 0],
            vec![25, 15, 1],
            vec![18, 8, 1],
            vec![8, 22, 0],
            vec![25, 15, 1],
            vec![30, 1, 1],
            vec![27, 30, 0]
        ]),
        22
    );
    assert_eq!(
        Solution::get_number_of_backlog_orders(vec![
            vec![23, 17, 1],
            vec![18, 27, 0],
            vec![21, 26, 1],
            vec![8, 17, 0],
            vec![13, 22, 1],
            vec![22, 21, 1],
            vec![2, 24, 1],
            vec![5, 7, 0]
        ]),
        69
    );
    assert_eq!(
        Solution::get_number_of_backlog_orders(vec![
            vec![286791088, 798094111, 0],
            vec![270132718, 190673425, 0],
            vec![162145493, 63038428, 0],
            vec![917586234, 459670838, 0],
            vec![56705655, 684105415, 0],
            vec![979633297, 873012019, 1],
            vec![538081887, 397556342, 0],
            vec![335745593, 43076309, 0],
            vec![570656259, 35633247, 1],
            vec![713239998, 137657056, 1],
            vec![819696855, 759830612, 1],
            vec![26435212, 790945632, 1],
            vec![97041136, 268444554, 1],
            vec![92111248, 324097821, 0],
            vec![923090442, 412570485, 0],
            vec![786629891, 280254261, 1],
            vec![789438405, 139591698, 1],
            vec![853165425, 408218589, 0],
            vec![918972463, 727773439, 1],
            vec![100994505, 456158124, 0],
            vec![539811845, 598264780, 0],
            vec![354449870, 991103455, 1],
            vec![546878322, 841407093, 1],
            vec![961775285, 627215894, 1],
            vec![112407810, 139289530, 1],
            vec![562368390, 599841776, 0],
            vec![962951411, 892942017, 1],
            vec![797981924, 168611716, 0],
            vec![397662296, 417941689, 1],
            vec![104561073, 439700398, 1],
            vec![135685267, 617300259, 0],
            vec![46787891, 322655271, 1],
            vec![448381949, 320319716, 1],
            vec![378618697, 292776531, 1],
            vec![803949721, 803710552, 0],
            vec![564926072, 130850462, 0],
            vec![340495099, 981848852, 1],
            vec![842572379, 351719653, 0],
            vec![485131330, 300231397, 1],
            vec![487631412, 980202523, 1],
            vec![996021428, 796326963, 1],
            vec![875775273, 955181326, 0],
            vec![990300618, 621661558, 0],
            vec![144505487, 52319295, 1],
            vec![618050103, 916008477, 1],
            vec![841758347, 263458579, 1],
            vec![388241161, 855676122, 1],
            vec![432261198, 330055646, 1],
            vec![642378304, 365557201, 0],
            vec![31216170, 159294968, 1],
            vec![737920689, 237438772, 0],
            vec![973675810, 121076648, 0],
            vec![822835057, 441424728, 0],
            vec![871586369, 106539247, 1],
            vec![767357987, 114823374, 0],
            vec![280995627, 71697207, 0],
            vec![918210730, 78180691, 0],
            vec![690672572, 900078704, 0],
            vec![549193431, 925387284, 1],
            vec![23460593, 633893306, 1],
            vec![966381816, 910135503, 1],
            vec![762655634, 866995185, 1],
            vec![236153249, 957006218, 0],
            vec![642181364, 530015440, 0],
            vec![456817101, 485539261, 1],
            vec![584626991, 979921047, 0],
            vec![857018573, 517713410, 0],
            vec![874060607, 902804313, 1],
            vec![437346193, 216212554, 0],
            vec![801851939, 571218111, 1],
            vec![552208020, 940675048, 1],
            vec![82047753, 433515821, 1],
            vec![43077540, 377770580, 1],
            vec![6873285, 203753809, 1],
            vec![747319506, 742314739, 0],
            vec![580650000, 128896958, 1],
            vec![550284045, 952614463, 1],
            vec![833834368, 583072672, 1],
            vec![564387926, 441776763, 1],
            vec![647218670, 676420026, 1],
            vec![485892086, 324173812, 0],
            vec![543654114, 476938198, 0],
            vec![590552061, 829475366, 0],
            vec![271381554, 683613211, 0],
            vec![455457663, 790419242, 0],
            vec![395526922, 451903643, 1],
            vec![302317355, 707587320, 0],
            vec![965023202, 97148783, 0],
            vec![908754494, 5173679, 1],
            vec![288702557, 498607743, 1],
            vec![854599176, 839172022, 1],
            vec![682724429, 804623264, 1]
        ]),
        571132385
    )
    // assert_eq!(Solution::solve(),"output");
    // TODO
}
